"""
业务服务层模块 - Backward Compatibility Exports
All services are now organized into logical folders but maintain backward compatibility
through this main __init__.py file.
"""

# Core Business Services
from .core import CameraService, camera_service, get_camera_service

# Campus Crowd Safety Management System (校园人流安全管理系统)
from .campus_crowd_safety import (
    PersonDetectionService, person_detection_service,
    CrowdDensityService, crowd_density_service,
    CrowdDensityAnalysisService,
    TrajectoryAnalysisService,
    EvacuationService
)

# Campus Behavior Safety Monitoring System (校园行为安全监测系统)
from .campus_behavior_monitoring import (
    BehaviorAnalysisService, behavior_analysis_service,
    PoseDetectionService,
    ConflictDetectionService
)

# Campus Environment Hygiene Management System (校园环境卫生管理系统)
from services.campus_environment_hygiene import (
    CleanlinessAssessmentService, cleanliness_assessment_service,
    CleanlinessStandardsManager, cleanliness_standards_manager,
    CleaningEfficiencyService, cleaning_efficiency_service,
    WasteDetectionService, waste_detection_service, WasteModelManager, waste_model_manager
)

# Campus Energy Management System (校园能耗智能管理系统)
from services.campus_energy_management import (
    EnergyAnalysisService,
    LightingDetectionService,
    SpaceOccupancyService
)

# Intelligent Classroom Quality Assessment System (智能课堂质量评估系统)
from services.intelligent_classroom_quality import (
    ClassroomQualityService,
    AttentionLevel,
    ParticipationLevel,
    LearningBehavior,
    ClassroomAtmosphere,
    StudentAttentionData,
    StudentParticipationData,
    ClassroomAnalysisResult,
    LearningPrediction
)

# Teaching Quality Assessment System (教学质量智能评估系统)
from services.teaching_quality_assessment import (
    TeachingQualityMainService,
    TeachingQualityService,
    TeacherBehaviorAnalyzer,
    InteractionAnalyzer,
    TeachingStyleAnalyzer,
    TeacherBehaviorData,
    InteractionData,
    TeachingStyleAnalysis,
    TeachingQualityReport,
    TeachingBehavior,
    TeachingStyle,
    FatigueLevel,
    InteractionQuality
)

# Video Processing Services
from services.video_processing import (
    VideoStreamService,
    ConcurrentStreamProcessor,
    RealTimeStreamPipeline,
    StreamHealthMonitor
)

# Alert and Notification Services
from services.alerts import (
    AlertManagementService, alert_management_service,
    AlertNotificationService,
    AlertRulesEngine,
    AlertWorkflowService,
    IntelligentAlertService
)

# AI Infrastructure Services
from services.ai_infrastructure import (
    AIServiceRouter, ai_service_router,
    initialize_ai_service_router, get_ai_service_router, shutdown_ai_service_router,
    AITaskScheduler, ai_task_scheduler,
    AIBatchProcessor,
    EnhancedGPUResourceManager, gpu_resource_manager
)

# Performance and Monitoring Services
from services.monitoring import (
    PerformanceOptimizationCoordinator, performance_optimization_coordinator,
    RealTimePerformanceMonitor, performance_monitor,
    ResourceMonitor, resource_monitor,
    RealTimeLoggingService, logging_service,
    DatabasePerformanceOptimizer, database_optimizer
)

# System Infrastructure Services
from services.infrastructure import (
    MultiLevelCache,
    AdaptivePerformanceController,
    ConfigValidationService, get_validation_service,
    SyncScheduler, get_sync_scheduler, start_sync_scheduler, stop_sync_scheduler
)

# External Integration Services
from services.integration import (
    WVPIntegrationService,
    DataAnalysisService, data_analysis_service,
    start_data_analysis_service, stop_data_analysis_service, get_data_analysis_service
)

# Data Aggregation Services
from services.aggregation import (
    RealTimeResultAggregator, real_time_result_aggregator
)

# Note: Backward compatibility is maintained through the main imports above
# Old import patterns like 'from services import person_detection_service' 
# will work because the service instances are already imported and exported

__all__ = [
    # Core Business Services
    "CameraService",
    
    # Campus Crowd Safety Management
    "PersonDetectionService", "person_detection_service",
    "CrowdDensityService", "crowd_density_service",
    "CrowdDensityAnalysisService",
    "TrajectoryAnalysisService",
    "EvacuationService",
    
    # Campus Behavior Safety Monitoring
    "BehaviorAnalysisService", "behavior_analysis_service",
    "PoseDetectionService",
    "ConflictDetectionService",
    
    # Campus Environment Hygiene Management
    "CleanlinessAssessmentService", "cleanliness_assessment_service",
    "CleanlinessStandardsManager", "cleanliness_standards_manager",
    "CleaningEfficiencyService", "cleaning_efficiency_service",
    "WasteDetectionService", "waste_detection_service", "WasteModelManager", "waste_model_manager",
    
    # Campus Energy Management
    "EnergyAnalysisService",
    "LightingDetectionService",
    "SpaceOccupancyService",
    
    # Intelligent Classroom Quality Assessment
    "ClassroomQualityService",
    "AttentionLevel", "ParticipationLevel", "LearningBehavior", "ClassroomAtmosphere",
    "StudentAttentionData", "StudentParticipationData", "ClassroomAnalysisResult", "LearningPrediction",
    
    # Teaching Quality Assessment
    "TeachingQualityMainService", "TeachingQualityService",
    "TeacherBehaviorAnalyzer", "InteractionAnalyzer", "TeachingStyleAnalyzer",
    "TeacherBehaviorData", "InteractionData", "TeachingStyleAnalysis", "TeachingQualityReport",
    "TeachingBehavior", "TeachingStyle", "FatigueLevel", "InteractionQuality",
    
    # Video Processing
    "VideoStreamService", "ConcurrentStreamProcessor", "RealTimeStreamPipeline", "StreamHealthMonitor",
    
    # Alert and Notification
    "AlertManagementService", "alert_management_service", "AlertNotificationService", "AlertRulesEngine", "AlertWorkflowService", "IntelligentAlertService",
    
    # AI Infrastructure
    "AIServiceRouter", "ai_service_router", "initialize_ai_service_router", "get_ai_service_router", "shutdown_ai_service_router",
    "AITaskScheduler", "ai_task_scheduler", "AIBatchProcessor", "EnhancedGPUResourceManager", "gpu_resource_manager",
    
    # Performance and Monitoring
    "PerformanceOptimizationCoordinator", "performance_optimization_coordinator",
    "RealTimePerformanceMonitor", "performance_monitor",
    "ResourceMonitor", "resource_monitor",
    "RealTimeLoggingService", "logging_service",
    "DatabasePerformanceOptimizer", "database_optimizer",
    
    # System Infrastructure
    "MultiLevelCache", "AdaptivePerformanceController",
    "ConfigValidationService", "get_validation_service",
    "SyncScheduler", "get_sync_scheduler", "start_sync_scheduler", "stop_sync_scheduler",
    
    # External Integration
    "WVPIntegrationService",
    "DataAnalysisService", "data_analysis_service", "start_data_analysis_service", "stop_data_analysis_service", "get_data_analysis_service",
    
    # Data Aggregation
    "RealTimeResultAggregator", "real_time_result_aggregator"
]